package com.bitcat.base.core

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.bitcat.base.net.LoadStatusEntity
import com.bitcat.base.net.LoadingDialogEntity
import com.kunminx.architecture.domain.message.MutableResult

/**
 * ViewModel基类
 */
open class BaseViewModel: ViewModel() {

    val loadingChange: UiLoadingChange by lazy { UiLoadingChange() }


    inner class UiLoadingChange{
        //加载中
        val loading by lazy { MutableResult<LoadingDialogEntity>() }
        //加载空
        val empty by lazy { MutableResult<LoadStatusEntity>() }

        //加载失败
        val error by lazy { MutableResult<LoadStatusEntity>() }

        //加载完成
        val success by lazy { MutableResult<LoadStatusEntity>() }
    }
}